function getData(element) {
    var data = {};
    // console.log($(element).parent().parent().children())
    $($(element).parent().parent().children()).each(function () {
        // console.log($(this).text())
        data[$(this).data('key')] = $(this).text();
    });
    // console.log(data);
    // get DOM
    var dataName = document.getElementById("dataName");
    var dataSex = document.getElementById("dataSex");
    var dataPhone = document.getElementById("dataPhone");
    var dataId = document.getElementById("dataId");
    var dataPart = document.getElementById("dataPart");
    var dataJob = document.getElementById("dataJob");
    var dataDoor = document.getElementById("dataDoor");
    // var dataType = document.getElementById("dataType");
    // 赋值
    dataName.value = data.Name;
    dataSex.value = data.Sex;
    // dataSex.value = data.Sex;
    dataPhone.value = data.Phone;
    dataId.value = data.Id;
    dataPart.value = data.Part;
    dataJob.value = data.Job;
    dataDoor.value = data.Door;
    // dataType.value = data.Type;
    // 重新定义
    $("#ConfirmChange").click(function () {
        console.log(data.ObjectId)
        var StaffList = AV.Object.createWithoutData('StaffList', data.ObjectId);
        StaffList.set('dataName', dataName.value);
        StaffList.set('dataSex', dataSex.value);
        StaffList.set('dataPhone', dataPhone.value);
        StaffList.set('dataId', dataId.value);
        StaffList.set('dataPart', dataPart.value);
        StaffList.set('dataJob', dataJob.value);
        StaffList.set('dataDoor', dataDoor.value);
        // StaffList.set('dataType', dataType.value);

        StaffList.save().then(function (success) { //改动成功
            $("input[class='prompt-show-font']").val("修改成功");
            $("#position-box").removeClass('hide');
            $("#prompt-box-right").removeClass('hide');
            $(".button-ok").click(function () {
                window.location.href = "../../../../company/view/staffInfo.html";
            })
        }, function (error) { // 改变失败
            alert(JSON.stringify(error));
        })
    })
}
